package cn.jsc.pet.domain;

import cn.jsc.basic.domain.BaseDomain;
import cn.jsc.org.domain.Shop;
import cn.jsc.user.domain.User;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 实体类：宠物
 */
@Data
public class Pet extends BaseDomain {
    //名称
    private String name;
    //宠物图片的路径
    private String resources;
    //销售价 = 市场价
    private BigDecimal saleprice;
    //下架时间
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date offsaletime;
    //上架时间
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date onsaletime;
    //状态
    private Integer state = 0;//默认值为下架
    //成本价 = 收购价
    private BigDecimal costprice;
    //添加时间
    private Date createtime = new Date();
    //宠物类型
    private Long type_id;
    private PetType type;
    //来自于哪个店铺 处理的寻主消息
    private Long shop_id;
    private Shop shop;
    //领养人id - 这个宠物是由谁领养的
    private Long user_id;
    private User user;
    //是由哪条寻主消息转换成的Pet：为null=宠物店自己养的，不为null就是通过寻主消息来的
    private Long search_master_msg_id;
    //宠物细节
    private PetDetail detail = new PetDetail();
    //支付方式
    private Integer payType;

}
